#--
数据字典渲染下拉框
--#
#define dict_select(id,val,code,empty,title,valid)
<select id="#(id)" name="#(id)" class="form-control" title="#(title)" #(valid)>
	#if(empty)
	<option value="">...请选择...</option>
	#end
	#for(x:com.yj.auto.helper.CacheHelper::getDicts(code))
    <option value="#(x.val)" #if(val==x.val) selected #end>#(x.name)</option>
	#end
</select>
#end

#define dict_checkbox(id,defval,code,title,cls)
<select id="#(id)" name="#(id)" class="form-control #(cls)">
	#if(empty)
	<option value="">...请选择...</option>
	#end
	#for(x:com.yj.auto.helper.CacheHelper::getDicts(code))
    <option value="#(x.val)" #if(defval==x.val) selected #end>#(x.name)</option>
	#end
</select>
#end

#define dict_radio(id,defval,code,title,cls)
<select id="#(id)" name="#(id)" class="form-control #(cls)">
	#if(empty)
	<option value="">...请选择...</option>
	#end
	#for(x:com.yj.auto.helper.CacheHelper::getDicts(code))
    <option value="#(x.val)" #if(defval==x.val) selected #end>#(x.name)</option>
	#end
</select>
#end

#define dict_name(code,val)
#set(x=com.yj.auto.helper.CacheHelper::getDict(code,val))
#(x.name??)
#end